#define _CRT_SECURE_NO_WARNINGS
#include<stdint.h>
#include<stdlib.h>
 struct ListNode {
      int val;
      struct ListNode *next;
 };
 
typedef struct ListNode ListNode;
struct ListNode* middleNode(struct ListNode* head) {
    ListNode* fast, * slow;
    fast = slow = head;
    while (fast && fast->next)   /	
    {
        slow = slow->next;
        fast = fast->next->next;
    }
    return slow;
}
int main()
{
    ListNode* n1 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* n2 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* n3 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* n4 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* n5 = (ListNode*)malloc(sizeof(ListNode));
    n1->val = 1;
    n1->next = n2;
    n2->val = 2;
    n2->next = n3;
    n3->val = 3;
    n3->next = NULL;
}